<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>超市</title>
</head>
<body>

<div style="margin-left: 716px;margin-top: 100px;">

    <table id="GroupTable"></table>

</div>

</body>

<script type="text/javascript">


    window.onload = function () {
        $.ajax({
            type: "GET",
            url: "http://localhost:5656/Commodity/select",
            dataType: "json",
            success: function (data) {
                var tbodyPage = "";
                for (var i = 0; i < data.length; i++) {
                    tbodyPage = tbodyPage +
                        '<tr>' +
                        '<td>' +
                        '<th>' + '<img style="width: 100px;height: 100px;" src="' + data[i].picture + '"></img>' + '</th>' +
                        '</td>' +
                        '</tr>'
                        + '<tr>' +
                        '<td>' +

                            '<th>' + data[i].name + '</th>' +
                            '<th>' + data[i].price + '</th>' +

                        '</td>'


                        + '</tr>'
                }
                $("#GroupTable").html(tbodyPage);
            }
        });
    }


</script>

<!-- jQuery (Bootstrap 的 JavaScript 插件需要引入 jQuery) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- 包括所有已编译的插件 -->
<script src="js/bootstrap.js"></script>
</html>